package top.mcwebsite.playandroid.home.api

import retrofit2.http.GET
import retrofit2.http.Path
import top.mcwebsite.playandroid.business.articles.api.model.ArticleModel
import top.mcwebsite.playandroid.common.network.model.ApiResult
import top.mcwebsite.playandroid.common.network.model.PageModel
import top.mcwebsite.playandroid.common.network.model.RespModel
import top.mcwebsite.playandroid.home.model.BannerModel

interface HomeNetworkApi {

    @GET("banner/json")
    suspend fun getBanners(): ApiResult<RespModel<List<BannerModel>>>

    @GET("/article/list/{page}/json")
    suspend fun getArticles(@Path("page") page: Int): ApiResult<RespModel<PageModel<ArticleModel>>>

    @GET("/article/top/json")
    suspend fun getTopArticles(): ApiResult<RespModel<List<ArticleModel>>>

}